<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<import type="js" file="js.jquery" />
<import type="js" file="js.common" />
<import type="css" file="css.global" />
<import type="css" file="css.form" />
</head>
<body>
<div class="search">
	<b>测试机管理</b>
</div>
<div class="becareful"><span>请填写各区域的测试机台数（大于1的正整数）</span></div>
<div id="form">
	<form action="setting" method="post" name="form1" onsubmit="return checkform();" >
	<table>
		<tr>
			<td class="titlename">华东区：</td>
			<td><input type="text" name="number[]" value="{$number[0]}"><input type="hidden" name="regional[]" value="huadongqu" > &nbsp;台</td>
		</tr>
		<tr>
			<td class="titlename">北方区：</td>
			<td><input type="text" name="number[]" value="{$number[1]}"><input type="hidden" name="regional[]" value="beifangqu" > &nbsp;台</td>
		</tr>
		<tr>
			<td class="titlename">华南区：</td>
			<td><input type="text" name="number[]" value="{$number[2]}"><input type="hidden" name="regional[]" value="huananqu" > &nbsp;台</td>
		</tr>
		<tr>
			<td class="titlename">西北区：</td>
			<td><input type="text" name="number[]" value="{$number[3]}"><input type="hidden" name="regional[]" value="xibeiqu" > &nbsp;台</td>
		</tr>
		<tr>
			<td class="titlename">西南区：</td>
			<td><input type="text" name="number[]" value="{$number[4]}"><input type="hidden" name="regional[]" value="xinanqu" > &nbsp;台</td>
		</tr>
		<tr>
			<td class="titlename">营销部：</td>
			<td><input type="text" name="number[]" value="{$number[5]}"><input type="hidden" name="regional[]" value="yingxiaobu" > &nbsp;台</td>
		</tr>
		<tr>
			<td class="titlename"></td>
			<td>
				<input type="submit" value="保存" class="submit">&nbsp;&nbsp;
				<input type="button" value="返回" class="button" onclick="back()">
			</td>
		</tr>
	</table>
	</form>
</div>
</body>
<script type="text/javascript">
	function checkform(){
		var reg = /^[1-9]*[1-9][0-9]*$/;
		var i = 1;
		$("input[name='number[]']").each(function(){
			var val = $(this).val();
			if( !reg.test(val) ){
				alert("第"+i+"行的值只能是大于0的正整数！");
				return false;
			}else{
				i++;
				return true;
			}
		});
	}
</script>
</html>